<template>
  <div>
    <h2>获取所有影院信息</h2>
    <div>{{rows}}</div>
  </div>
</template>

<script lang='ts'>
import {ref,reactive,onBeforeMount} from 'vue'
import {storeToRefs} from 'pinia'
import useTheatresStore from '../store/theatres'
export default{
 setup(){
  const store=useTheatresStore()
  const {rows}=storeToRefs(store)
  //在此钩子函数中向网络发送请求
  onBeforeMount(()=>{
    store.getThreatresList()
  })
  return{
    rows
  }
 }
}
</script>

<style lang='scss' scoped>
</style>